package it.heima.chy;

import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.util.Properties;
import java.util.ResourceBundle;
import java.util.Set;

public class Test2 {
    public static void main(String[] args) throws IOException {
        Properties properties = new Properties();
        properties.load(new FileReader("iphone.properties"));
//        String brand = properties.getProperty("brand");
//        String capacity = properties.getProperty("capacity");
//        String price = properties.getProperty("price");

//        Set<String> keys =properties.stringPropertyNames();
//        for (String key : keys) {
//            String value = properties.getProperty(key);
//            System.out.println(key+"------->"+value);
 //   }
        properties.forEach((k,v)-> System.out.println(k+"---->"+v));
        }
    }

